WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::MotionProvider Class Referenceabstract

Interface of the processors providing motion: the state at any time stamp (and odometry). If configured as state provider, the problem uses it to get the current state. More...

#include <core/processor/motion_provider.h>

Inheritance diagram for wolf::MotionProvider:
[legend]

Public Member Functions

 MotionProvider (const TypeComposite &_state_types, const YAML::Node &_params)
 Constructor. More...
 
virtual ~MotionProvider ()
 Destructor. More...
 
virtual TimeStamp getTimeStamp () const =0
 Returns the time stamp of the last motion. More...
 
virtual VectorComposite getState (StateKeys _keys="") const =0
 Returns the state at the time stamp of the last motion. More...
 
virtual VectorComposite getState (const TimeStamp &_ts, StateKeys _keys="") const =0
 Returns the state at a time stamp. More...
 
VectorComposite getOdometry () const
 Returns the odometry. More...
 
void setOdometry (const VectorComposite &)
 Sets the odometry (all the keys of the motion provider are required) More...
 
bool isStateProvider () const
 Returns whether the motion provider is configured as a state provider. More...
 
unsigned int getOrder () const
 Returns the order of the state provider to be used by the problem. Throws if not a state provider. More...
 
void setOrder (unsigned int)
 Sets the order of the state provider to be used by the problem. Throws if not a state provider. More...
 

Protected Member Functions

void addTypes (const TypeComposite &_state_types)
 Adds the types of the states provided (with identity odometry). Throws if a key already has a different type. More...
 

Protected Attributes

bool is_state_provider_
 Whether this motion provider is configured as a state provider. More...
 
unsigned int state_provider_order_
 If a state provider, the order to be used by the problem. More...
 

Detailed Description

Interface of the processors providing motion: the state at any time stamp (and odometry). If configured as state provider, the problem uses it to get the current state.

Constructor & Destructor Documentation

◆ MotionProvider()

MotionProvider::MotionProvider ( const TypeComposite &  _state_types,
const YAML::Node &  _params 
)

Constructor.

Parameters
_state_typesTypeComposite with the types of the states that this motion provider will provide.
_paramsYAML node with the parameters of the motion provider ('state_provider' and optionally 'state_provider_order').

◆ ~MotionProvider()

wolf::MotionProvider::~MotionProvider ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ addTypes()

void MotionProvider::addTypes ( const TypeComposite &  _state_types)
protected

Adds the types of the states provided (with identity odometry). Throws if a key already has a different type.

◆ getOdometry()

wolf::VectorComposite MotionProvider::getOdometry ( ) const

Returns the odometry.

◆ getOrder()

unsigned int wolf::MotionProvider::getOrder ( ) const
inline

Returns the order of the state provider to be used by the problem. Throws if not a state provider.

◆ getState() [1/2]

virtual VectorComposite wolf::MotionProvider::getState ( const TimeStamp &  _ts,
StateKeys  _keys = "" 
) const
pure virtual

Returns the state at a time stamp.

Parameters
_tsThe time stamp of the state to retrieve
_keysThe keys of the states to retrieve (all keys if empty)

Implemented in wolf::ProcessorMotion.

◆ getState() [2/2]

virtual VectorComposite wolf::MotionProvider::getState ( StateKeys  _keys = "") const
pure virtual

Returns the state at the time stamp of the last motion.

Parameters
_keysThe keys of the states to retrieve (all keys if empty)

Implemented in wolf::ProcessorMotion.

◆ getTimeStamp()

virtual TimeStamp wolf::MotionProvider::getTimeStamp ( ) const
pure virtual

Returns the time stamp of the last motion.

Implemented in wolf::ProcessorMotion.

◆ isStateProvider()

bool wolf::MotionProvider::isStateProvider ( ) const
inline

Returns whether the motion provider is configured as a state provider.

◆ setOdometry()

void MotionProvider::setOdometry ( const VectorComposite &  _odom)

Sets the odometry (all the keys of the motion provider are required)

◆ setOrder()

void wolf::MotionProvider::setOrder ( unsigned int  _order)
inline

Sets the order of the state provider to be used by the problem. Throws if not a state provider.

Member Data Documentation

◆ is_state_provider_

bool wolf::MotionProvider::is_state_provider_
protected

Whether this motion provider is configured as a state provider.

◆ state_provider_order_

unsigned int wolf::MotionProvider::state_provider_order_
protected

If a state provider, the order to be used by the problem.


The documentation for this class was generated from the following files: